package com.neu.af.dataFilter.entity;

import com.neu.af.common.base.BaseEntity;
import com.neu.af.common.validationGroup.DeleteGroup;
import com.neu.af.common.validationGroup.InsertGroup;
import com.neu.af.common.validationGroup.UpdateGroup;
import javax.validation.constraints.NotNull;


public class Rule implements BaseEntity<String> {
    String ID;
    @NotNull(message = "规则匹配字段不能为空",groups = {InsertGroup.class, UpdateGroup.class})
    String contains;
    @NotNull(message = "报警等级字段不能为空",groups = {InsertGroup.class, UpdateGroup.class})
    int alarm_class;

    public String getContains() {
        return contains;
    }

    public void setContains(String contains) {
        this.contains = contains;
    }

    public int getAlarm_class() {
        return alarm_class;
    }

    public void setAlarm_class(int alarm_class) {
        this.alarm_class = alarm_class;
    }

    public void setID(String ID) {
        this.ID = ID;
    }


    @Override
    public String toString() {
        return "Rule{" +
                "ID='" + ID + '\'' +
                ", contains='" + contains + '\'' +
                ", alarm_class=" + alarm_class +
                '}';
    }

    @Override
    public String getId() {
        return ID;
    }
}
